﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.IO;



namespace Spellchecker
{
    internal static class DateiLeser
    {
        internal static Dictionary< string , bool > Load( string fileName )
        {
            var allowedWords = File.ReadAllLines(fileName);

            var result = new Dictionary<string, bool>();

            foreach (var wordAsUpper in allowedWords.Select(word => UpperCaser.MakeUpperCase(word)))
            {
                result[wordAsUpper] = true;
            }
            return result;
        }
    }
}
